
angular.module("Horizon").controller("timeCtr",["$scope","$timeout",function($scope,$timeout){
	
	var date=new Date();
	$scope.time=date;
	setInterval(function () {
		$scope.$apply(function () {
			date=new Date();
			$scope.time=date;
			console.log($scope.time);
		});
	}, 60000); 
	var timeStyle=null;
	clearInterval(timeStyle);  
	var timeStyle=setInterval(function(){
		move();
	},1000);
	var flag=0;
	function move(){
		var oLine=document.querySelector(".blink");
		if (!flag){
			oLine.style.opacity="1";
			oLine.style.background="#FF000F";
			flag=1;
		}else{
			oLine.style.opacity="0";
			flag=0;
		}
	}
}])
